* Replication file for "Issue Ownership, Issue Positions, and Candidate Assessment"
* Published in Political Communication
* By Kevin K. Banda

clear all
use "Replication.dta"

/*

Codebook

treat3 = treatment indicator (see labels)
canddem = is the candidate identified as a Dem (1) or a Rep (0)?
pid3 = partisanship of the respondent (Dem, Rep, or independents; leaners counted as partisans)
pidsame = does the respondent share their PID with the candidate? 1 = yes, 0 = no
education = level of education of the respondent (see labels)

The rest of the variables are respondents' assessments of the candidate's positions
	in ideological space, across mentioned/unmentioned issues, and on individual
	issues. Higher numbers indicate more extreme assessments in the direction
	implied by the candidate's party, i.e. more liberal for Dems and more
	conservative for Reps.

id3 = ideological assessment of the candidate.
men4 = assessments of candidate's positions on the four issues that could have been
	mentioned in the treatments (health care, affirmative action, taxes,
	and national defense).
un4 = assessments of candidate's positions on the two issues that were never
	discussed (abortion and government services).
hc3 = assessment of candidate's position on health care.
aa3 = assessment of candidate's position on affirmative action.
tx3 = assessment of candidate's position on taxes.
nd3 = assessment of candidate's position on national defense.
ab3 = assessment of candidate's position on abortion.
gs3 = assessment of candidate's position on government services.

*/


* Table 2: treatment assignment (note that the language used in the labels
*	and the paper is a little different)
ta treat3

* Figure 2: tests of H1 and H3
* 	Note: these plots and those for Figure 3 use the cibar package. You will
*	need to install it because it isn't part of Stata's base program.
*	T-tests follow the figures.

* Ideology
cibar id3 if treat3<4, over1(treat3) level(95) ///
	graphopts(ylabel(1(1)6) ytitle("Ideological extremity" " ") ///
	xlabel(1 "Control" 2 `" "In-party" "ownership" "' 3 `" "Out-party" "ownership""', noticks labsize(3.5)) legend(off) plotregion(margin(b = 0 t = 0)) ysize(4) xsize(4) ///
	title("Ideology")) baropts(color(gs6) barwidth(.9)) ///
	ciopts(lcolor(black) msize(*5) lw(.5))

ttest id3 if treat3==1 | treat3==2, by(treat3)
ttest id3 if treat3==1 | treat3==3, by(treat3)

* Mentioned issues
cibar men4 if treat3<4, over1(treat3) level(95) ///
	graphopts(ylabel(1(3)28) ytitle("Positional extremity" " ") ///
	xlabel(1 "Control" 2 `" "In-party" "ownership" "' 3 `" "Out-party" "ownership""', noticks labsize(3.5)) legend(off) ///
	plotregion(margin(b = 0 t = 0)) title("Mentioned Issues") ysize(4) xsize(4)) ///
	baropts(color(gs6) barwidth(.9)) ///
	ciopts(lcolor(black) msize(*5) lw(.5))

ttest men4 if treat3==1 | treat3==2, by(treat3)
ttest men4 if treat3==1 | treat3==3, by(treat3)

* Unmentioned issues
cibar un4 if treat3<4, over1(treat3) level(95) ///
	graphopts(ylabel(1(3)16) ytitle("Positional extremity" " ") ///
	xlabel(1 "Control" 2 `" "In-party" "ownership" "' 3 `" "Out-party" "ownership""', noticks labsize(3.5)) legend(off) ///
	plotregion(margin(b = 0 t = 0)) title("Unmentioned Issues") ysize(4) xsize(4)) ///
	baropts(color(gs6) barwidth(.9)) ///
	ciopts(lcolor(black) msize(*5) lw(.5))

ttest un4 if treat3==1 | treat3==2, by(treat3)
ttest un4 if treat3==1 | treat3==3, by(treat3)



* Figure 3: tests of H2 and H4, and H3 again

* Ideology
cibar id3 if treat3==1 | treat3>3, over1(treat3) level(95) ///
	graphopts(ylabel(1(1)6) ytitle("Ideological extremity" " ") ///
	xlabel(1 "Control" 2 `" "In-party" "extreme""' 3 `" "Out-party" "extreme""' 4 `" "In-party" "moderate""' ///
	5 `" "Out-party" "moderate""', noticks labsize(3.5) alt) legend(off) plotregion(margin(b = 0 t = 0)) ysize(4) xsize(4) ///
	title("Ideology")) baropts(color(gs6) barwidth(.9)) ///
	ciopts(lcolor(black) msize(*5) lw(.5))

ttest id3 if treat3==1 | treat3==4, by(treat3)
ttest id3 if treat3==1 | treat3==5, by(treat3)
ttest id3 if treat3==1 | treat3==6, by(treat3)
ttest id3 if treat3==1 | treat3==7, by(treat3)

* Mentioned issues
cibar men4 if treat3==1 | treat3>3, over1(treat3) level(95) ///
	graphopts(ylabel(1(3)31) ytitle("Positional extremity" " ") ///
	xlabel(1 "Control" 2 `" "In-party" "extreme""' 3 `" "Out-party" "extreme""' 4 `" "In-party" "moderate""' ///
	5 `" "Out-party" "moderate""', noticks labsize(3.5) alt) legend(off) plotregion(margin(b = 0 t = 0)) ///
	title("Mentioned Issues") ysize(4) xsize(4)) ///
	baropts(color(gs6) barwidth(.9)) ///
	ciopts(lcolor(black) msize(*5) lw(.5))

ttest men4 if treat3==1 | treat3==4, by(treat3)
ttest men4 if treat3==1 | treat3==5, by(treat3)
ttest men4 if treat3==1 | treat3==6, by(treat3)
ttest men4 if treat3==1 | treat3==7, by(treat3)

* Unmentioned issues
cibar un4 if treat3==1 | treat3>3, over1(treat3) level(95) ///
	graphopts(ylabel(1(3)16) ytitle("Positional extremity" " ") ///
	xlabel(1 "Control" 2 `" "In-party" "extreme""' 3 `" "Out-party" "extreme""' 4 `" "In-party" "moderate""' ///
	5 `" "Out-party" "moderate""', noticks labsize(3.5) alt) legend(off) plotregion(margin(b = 0 t = 0)) ///
	title("Unmentioned Issues") ysize(4) xsize(4)) ///
	baropts(color(gs6) barwidth(.9)) ///
	ciopts(lcolor(black) msize(*5) lw(.5))

ttest un4 if treat3==1 | treat3==4, by(treat3)
ttest un4 if treat3==1 | treat3==5, by(treat3)
ttest un4 if treat3==1 | treat3==6, by(treat3)
ttest un4 if treat3==1 | treat3==7, by(treat3)








* Appendix material

* Figure 2: individual mentioned issues

* Health care
cibar hc3, over1(treat3) level(90) ///
	graphopts(ylabel(1(1)8) ytitle("Positional extremity") ///
	xlabel(1 "Control" 2.1 `" "In-party" "ownership" "' 3.2 `" "Out-party" "ownership""' ///
	4.3 `" "In-party" "extreme""' 5.4 `" "Out-party" "extreme""' 6.5 `" "In-party" "moderate""' ///
	7.6	`" "Out-party" "moderate""', noticks labsize(3.5) alt) legend(off) ///
	title("Health care")) baropts(color(gs8) ylabel(1(1)8, grid)) ///
	ciopts(lcolor(black) msize(*5)) bargap(10)

ttest hc3 if treat3==1 | treat3==2, by(treat3)
ttest hc3 if treat3==1 | treat3==3, by(treat3)
ttest hc3 if treat3==4 | treat3==5, by(treat3)
ttest hc3 if treat3==6 | treat3==7, by(treat3)

* Affirmative action
cibar aa3, over1(treat3) level(90) ///
	graphopts(ylabel(1(1)8) ytitle("Positional extremity") ///
	xlabel(1 "Control" 2.1 `" "In-party" "ownership" "' 3.2 `" "Out-party" "ownership""' ///
	4.3 `" "In-party" "extreme""' 5.4 `" "Out-party" "extreme""' 6.5 `" "In-party" "moderate""' ///
	7.6	`" "Out-party" "moderate""', noticks labsize(3.5) alt) legend(off) ///
	title("Affirmative action")) baropts(color(gs8) ylabel(1(1)8, grid)) ///
	ciopts(lcolor(black) msize(*5)) bargap(10)
ttest aa3 if treat3==1 | treat3==2, by(treat3)
ttest aa3 if treat3==1 | treat3==3, by(treat3)
ttest aa3 if treat3==4 | treat3==5, by(treat3)
ttest aa3 if treat3==6 | treat3==7, by(treat3)

* Taxes	
cibar tx3, over1(treat3) level(90) ///
	graphopts(ylabel(1(1)8) ytitle("Positional extremity") ///
	xlabel(1 "Control" 2.1 `" "In-party" "ownership" "' 3.2 `" "Out-party" "ownership""' ///
	4.3 `" "In-party" "extreme""' 5.4 `" "Out-party" "extreme""' 6.5 `" "In-party" "moderate""' ///
	7.6	`" "Out-party" "moderate""', noticks labsize(3.5) alt) legend(off) ///
	title("Taxes")) baropts(color(gs8) ylabel(1(1)8, grid)) ///
	ciopts(lcolor(black) msize(*5)) bargap(10)
ttest tx3 if treat3==1 | treat3==2, by(treat3)
ttest tx3 if treat3==1 | treat3==3, by(treat3)
ttest tx3 if treat3==1 | treat3==4, by(treat3)
ttest tx3 if treat3==4 | treat3==5, by(treat3)
ttest tx3 if treat3==6 | treat3==7, by(treat3)

* National defense	
cibar nd3, over1(treat3) level(90) ///
	graphopts(ylabel(1(1)8) ytitle("Positional extremity") ///
	xlabel(1 "Control" 2.1 `" "In-party" "ownership" "' 3.2 `" "Out-party" "ownership""' ///
	4.3 `" "In-party" "extreme""' 5.4 `" "Out-party" "extreme""' 6.5 `" "In-party" "moderate""' ///
	7.6	`" "Out-party" "moderate""', noticks labsize(3.5) alt) legend(off) ///
	title("National defense")) baropts(color(gs8) ylabel(1(1)8, grid)) ///
	ciopts(lcolor(black) msize(*5)) bargap(10)
ttest nd3 if treat3==1 | treat3==2, by(treat3)
ttest nd3 if treat3==1 | treat3==3, by(treat3)
ttest nd3 if treat3==1 | treat3==5, by(treat3)
ttest nd3 if treat3==4 | treat3==5, by(treat3)
ttest nd3 if treat3==6 | treat3==7, by(treat3)


* Figure 3: individual unmentioned issues

* Abortion
cibar ab3, over1(treat3) level(90) ///
	graphopts(ylabel(1(1)8) ytitle("Positional extremity") ///
	xlabel(1 "Control" 2.1 `" "In-party" "ownership" "' 3.2 `" "Out-party" "ownership""' ///
	4.3 `" "In-party" "extreme""' 5.4 `" "Out-party" "extreme""' 6.5 `" "In-party" "moderate""' ///
	7.6	`" "Out-party" "moderate""', noticks labsize(3.5) alt) legend(off) ///
	title("Abortion")) baropts(color(gs8) ylabel(1(1)8, grid)) ///
	ciopts(lcolor(black) msize(*5)) bargap(10)
ttest ab3 if treat3==1 | treat3==2, by(treat3)
ttest ab3 if treat3==1 | treat3==3, by(treat3)
ttest ab3 if treat3==1 | treat3==4, by(treat3)

* Government services
cibar gs3, over1(treat3) level(90) ///
	graphopts(ylabel(1(1)8) ytitle("Positional extremity") ///
	xlabel(1 "Control" 2.1 `" "In-party" "ownership" "' 3.2 `" "Out-party" "ownership""' ///
	4.3 `" "In-party" "extreme""' 5.4 `" "Out-party" "extreme""' 6.5 `" "In-party" "moderate""' ///
	7.6	`" "Out-party" "moderate""', noticks labsize(3.5) alt) legend(off) ///
	title("Government services")) baropts(color(gs8) ylabel(1(1)8, grid)) ///
	ciopts(lcolor(black) msize(*5)) bargap(10)
ttest gs3 if treat3==1 | treat3==2, by(treat3)
ttest gs3 if treat3==1 | treat3==3, by(treat3)
ttest gs3 if treat3==1 | treat3==3, by(treat3)

	
* Table 1: does shared partisanship condition the effects of the treatment?
	* Note that this only compares in-partisans to out-partisans; independents are omitted
reg id3 i.treat3##c.pidsame if pid3!=2
reg hc3 i.treat3##c.pidsame if pid3!=2
reg aa3 i.treat3##c.pidsame if pid3!=2
reg tx3 i.treat3##c.pidsame if pid3!=2
reg nd3 i.treat3##c.pidsame if pid3!=2
reg ab3 i.treat3##c.pidsame if pid3!=2
reg gs3 i.treat3##c.pidsame if pid3!=2

* Table 2: does education condition the effects of the treatments?
reg id3 i.treat3##c.education
reg hc3 i.treat3##c.education
reg aa3 i.treat3##c.education
reg tx3 i.treat3##c.education
reg nd3 i.treat3##c.education
reg ab3 i.treat3##c.education
reg gs3 i.treat3##c.education
